<template>
  <div id="app" >
    <router-view/>
    <div v-loading.fullscreen.lock="isLoading"></div>
  </div>
</template>

<script>
import { Loading } from 'element-ui';
import { mapState } from 'vuex'
// import io from './common/socket'
export default {
  computed :{
    isLoading(){
      // if(this.$store.state.home.isLoading == true){
      //   alert(1)
      // setTimeout(()=>{
        return this.$store.state.home.isLoading
      // },5000)
        
      // }else{
      //   this.$store.commit('updateLoadingStatus', {isLoading: true})
      //   setTimeout(()=>{
      //     this.$store.commit('updateLoadingStatus', {isLoading: true})
      //     return this.$store.state.home.isLoading
      //   },500)
      // }
      
    }
  },
  mounted(){
    // console.log(io)
    !localStorage.getItem("user_data") && localStorage.setItem("user_data",'');
    !localStorage.getItem("city") && localStorage.setItem("city",'长春市');
    this.$store.dispatch('loginLocalstorToState');
    this.$store.dispatch('cityLocalstorToState');

  },
  methods: {
    
  }
}
</script>

<style lang="less">
*{box-sizing: border-box;margin: 0; padding:0; list-style: none;}
body {
    margin: 0;
    font-family: Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
    font-size: 14px;
    font-variant: tabular-nums;
    line-height: 1.5;
    color: rgba(0,0,0,.65);
    background-color: #fff;
}
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

a{ text-decoration: none; color: #a8b4cb; }

.row { display: flex;  flex-direction: row; }

.column { display: flex; flex-direction: column; }

.jcc{ justify-content: center }

.jcsb{ justify-content: space-between }

.aic{ align-items: center }

.fww{ flex-wrap: wrap; }

.flex-grow-1{ flex: 1; }

.is-active { color: #409EFF; }

.block { display: block; }

.text-center { text-align: center; }
</style>
